from fractions import Fraction
from math import gcd
"""
本地测试能通过，但在线端就不行
56ms 4060KB 1/5错误
"""

a,b,c=input().split()
c=int(c)
fa=Fraction(a)
# a=a.split("/")
fb=Fraction(b)
if fb<fa:
    fa,fb=fb,fa

k=1
res=[]
while k/c<fb:
    if k/c>fa and gcd(c,k)==1:
        res.append(f"{k}/{c}")
    k+=1
print(" ".join(res))
